---
layout: m1x_soap
title: Attribute Options
---

<h2><a name="catalog_product_attribute.options-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>


<h4><a name="catalog_product_attribute.options-Resource%3Acatalogproductattribute"></a>Resource: catalog_product_attribute</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute</li>
</ul>


<h5><a name="catalog_product_attribute.options-Method%3A"></a>Method:</h5>

<ul>
	<li>catalog_product_attribute.options (SOAP V1)</li>
	<li>catalogProductAttributeOptions (SOAP V2)</li>
</ul>


<p>Allows you to retrieve the product attribute options.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute.options</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId <br class="atl-forced-newline" /> </td>
<td> Session ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> attributeId <br class="atl-forced-newline" /> </td>
<td> Attribute ID or code </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> storeView <br class="atl-forced-newline" /> </td>
<td> Store view ID or code (optional) </td>
</tr>
</tbody></table>


<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of catalogAttributeOptionEntity </td>
</tr>
</tbody></table>


<p>The <b>catalogAttributeOptionEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> label </td>
<td> Option label </td>
</tr>
<tr>
<td> string </td>
<td> value </td>
<td> Option value </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 101 </td>
<td> Requested attribute not found. </td>
</tr>
</tbody></table>



<h4><a name="catalog_product_attribute.options-Examples"></a>Examples</h4>

<h5><a name="catalog_product_attribute.options-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$attributeId = 11; // Existing selectable attribute ID

$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute.options",
    array(
         $attributeId
    )
);
echo "&lt;pre&gt;";
var_dump($result);</pre>
		</div>
</div></div>

<h5><a name="catalog_product_attribute.options-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogProductAttributeOptions($sessionId, '11');
var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="catalog_product_attribute.options-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductAttributeOptions((object)array('sessionId' =&gt; $sessionId-&gt;result, 'attributeId' =&gt; '11'));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>


<h5><a name="catalog_product_attribute.options-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">array
  1 =&gt;
    array
      'value' =&gt; string '5' (length=1)
      'label' =&gt; string 'blue' (length=4)
  2 =&gt;
    array
      'value' =&gt; string '4' (length=1)
      'label' =&gt; string 'green' (length=5)
  3 =&gt;
    array
      'value' =&gt; string '3' (length=1)
      'label' =&gt; string 'yellow' (length=6)</pre>
		</div>
</div></div>

<?php include(__ROOT__ . 'footer.php'); ?>
